import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    name:'Layout',
    component:()=>import('@/views/Layout/Layout.vue'),
    children:[
      {
        path:'home',
        name:'主页',
        component:() =>import('@/views/Home.vue')
      },
      {
        path:'energyWarning',
        name:'能效预警',
        component:()=>import('@/views/ZzDoubleCarbon/EnergyWarning.vue')
      },
      {
        path:'energyDataCollection',
        name:'能耗数据采集',        
        component:()=>import('@/views/ZzDoubleCarbon/EnergyDataCollection.vue')
      },
      {
        path:'projectMaintenance',
        name:'项目维护',
        component:()=>import('@/views/ZzImplementMES/ProjectMaintenance.vue')
      },
      {
        path:'factoryModeling',
        name:'工厂建模',
        component:()=>import('@/views/ZzImplementMES/FactoryModeling.vue')
      },
      {
        path:'deviceInformation',
        name:'设备信息',
        component:()=>import('@/views/ZzImplementMES/DeviceInformation.vue')
      }
    ]
  },
  {
    path:'/login',
    name:'Login',
    component:()=>import('@/views/Login/Login.vue')
  },
  {
    path:'/register',
    name:'Register',
    component:()=>import('@/views/Login/Register.vue')
  }
  
]

const router = new VueRouter({
  routes
})

export default router
